import { http } from '@/api/_service.js'

const controller = '/Product/';

/* 获取产品列表（分页） */
export const getProductMoList = (params) => {
    return http.post(controller + 'GetProductList', params)
}

/* 获取产品详情 */
export const getProductMoInfo = (productID) => {
    return http.get(controller + 'GetProductInfo', { productID })
}

/* 上传产品图片 */
export const uploadFile = (file) => {
    return http.post(controller + 'UploadFile', file)
}

/* 保存产品信息 */
export const saveProductMoInfo = (params) => {
    return http.post(controller + 'SaveProductInfo', params)
}

/* 设置产品状态 */
export const setProductMoState = (params) => {
    return http.post(controller + 'SetProductState', params)
}

/* 获取所有产品列表 */
export const getAllProductMoList = () => {
    return http.get(controller + 'GetProductList')
}
